Skip to content

Skip child idle when create was missed (Task metadata + hydrate) - #6

Merged
gabparrot merged 1 commit into
mainfrom
fix-child-notify-leak
Aug 22, 2026
Merged

Skip child idle when create was missed (Task metadata + hydrate)#6
gabparrot merged 1 commit into
mainfrom
fix-child-notify-leak

Conversation

@gabparrot

Copy link
Copy Markdown
Owner

Why

PR #3 only learned children from session.created / session.updated plus info.parentID. Resume, restart, durable event type names (session.created.1), parent_id aliases, Task metadata, and (@agent subagent) titles left children unknown, so idle fail-opened and notified.

What

  • Learn children from durable event names, parent_id / parentID aliases, Task part/state metadata (parentSessionId + sessionId), and titles matching (@… subagent).
  • Hydrate session.list() before the event hook so a plugin resume/restart does not fail-open a known child idle.
  • Parent idle still notifies when the parent finishes.
  • Truly unknown sessions still fail-open (notify).
  • notifySubagents default remains false.

Not stacked on #5 (focus-tui-on-click). This branch is from main at 0.3.0.

Test plan

  • bun run typecheck
  • bun test (107 pass)

Learn children from durable event names, parent_id aliases, Task
metadata, and (@agent subagent) titles. Hydrate session.list()
before the event hook so resume/restart does not fail-open a
child idle. Parent idle and unknown-session fail-open unchanged.
@gabparrot
gabparrot merged commit e820db6 into main Aug 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant